//
//  ADRadioButton.h
//  ADKit
//
//  Created by duzexu on 2018/1/4.
//

#import "ADButton.h"

@class ADRadioButton;
@protocol ADRadioButtonDelegate <NSObject>

@optional
- (void)didSelectedRadioButton:(ADRadioButton *)radio groupId:(NSString *)groupId;

@end

@interface ADRadioButton : ADButton

@property(nonatomic, assign) IBOutlet id<ADRadioButtonDelegate> delegate;
@property(nonatomic, copy, readonly) IBInspectable NSString *groupId;
@property(nonatomic, assign) IBInspectable BOOL unCheckable;//可以取消选择

//// 只修改状态 不调用代理
@property(nonatomic, assign) IBInspectable BOOL checked;

+ (instancetype)buttonWithSpace:(NSInteger)buttonSpace delegate:(id<ADRadioButtonDelegate>)delegate groupId:(NSString *)groupId;
+ (instancetype)buttonWithLayout:(ADButtonLayout)buttonLayout space:(NSInteger)buttonSpace delegate:(id<ADRadioButtonDelegate>)delegate groupId:(NSString *)groupId;

@end
